const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,

  devServer:{
    //配置自动打开浏览器
    open: true,
    host: "127.0.0.1",
    port: "8882",

    //配置跨域
    proxy:{
      //前缀
      "/api1":{
        //目标地址
        target: "http://gmall-h5-api.atguigu.cn/",
        changeOrigin: true,
        pathRewrite: {
          '^/api1': ''
        }

      }
    }
  },

  //配置路径别名
  configureWebpack: {
    resolve: {
        alias: {
            "@assets": "@/assets",
            "@comp": "@/components",
            "@pages": "@/pages",
        },
    },
},

  
})
